home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Commodities / YAFWC / YAFWC.mod < prev    next >
Text File  |  1996-09-26  |  1KB  |  52 lines

  1. MODULE YAFWC2;
  2.  
  3. IMPORT
  4.   y := SYSTEM,
  5.  
  6.   cx := Commodities,
  7.   ie := InputEvent,
  8.  
  9.   CtrlC,
  10.   CX,
  11.   sig := Signals;
  12.  
  13. VAR
  14.   yafwc :CX.Com;
  15.   ctrlC :CtrlC.CtrlC;
  16.   prg :sig.Signals;
  17.  
  18.   filter :CX.Filter;
  19.   translate: CX.Translate;
  20.   event :ie.InputEvent;
  21.  
  22. BEGIN
  23.   yafwc := CX.Create(y.ADR("YAFWC\o\o$VER: YAFWC.mod 1.1 (12.09.95)"),
  24.                      y.ADR("YAFWC 1.1 ©1995 S. Le Breton"),
  25.                      y.ADR("Close window with 'lcommand q'"),
  26.                      {cx.unique, cx.notify}, {},
  27.                      0);
  28.   IF yafwc#NIL THEN
  29.     NEW(filter);
  30.     filter.Init("lcommand q\o|<-User-Configuration-:)-last-char-------->|\o");
  31.     filter.Attach(yafwc.Broker);
  32.     event.class := ie.closewindow;
  33.     NEW(translate);
  34.     translate.Init(event);
  35.     translate.Set(event);
  36.     translate.Attach(filter);
  37.     yafwc.Broker.Activate(TRUE);
  38.   
  39.     NEW(ctrlC);
  40.     ctrlC.Init();
  41.   
  42.     NEW(prg);
  43.     prg.Init();
  44.     IF prg.Add(yafwc)#NIL THEN END;
  45.     IF prg.Add(ctrlC)#NIL THEN END;
  46.     prg.Loop();
  47.   END;
  48.  
  49. CLOSE
  50.   IF yafwc#NIL THEN yafwc.Delete() END;
  51. END YAFWC2.
  52.